---
title: Configuration
layout: page
pageOrder: 9
section: 'General'
subsection: true
sitemap:
priority: 0.8
changefreq: 'monthly'
lastmod: 2019-11-10T08:00:00+01:00
---

<h2>Settings Properties</h2>

<p>Properties can be set by:</p>
<ol>
    <li>java code (highest precedence)</li>
    <li>system property</li>
    <li>property file</li>
    <li>environment property (lowest precedence)</li>
</ol>
<p>The order of precedence means that properties set by java code overrides those set by system properties which overrides property file properties which overrides environment variables.</p>
<p>Some properties need to be set before MockServer starts because they are only read at start-up, for example, <a href="#button_configuration_nio_event_loop_thread_count">nioEventLoopThreadCount</a>.</p>
<p>Other values are read continuously and so can be changed at any time, for example, <a href="#button_configuration_log_level">logLevel</a>.</p>

<a id="property_file" class="anchor" href="#property_file">&nbsp;</a>

<h2>Property File</h2>

<p>The property file defaults to filename <span class="inline_code"><strong>mockserver.properties</strong></span> in the current working directory of MockServer.</p>
<p>This location of the property file can be changed by setting the <span class="inline_code"><strong>mockserver.propertyFile</strong></span> system property or <span class="inline_code"><strong>MOCKSERVER_PROPERTY_FILE</strong></span> environment property, for example:</p>

<pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.propertyFile=/config/mockserver.properties</code></pre>

<p>An example properties file can be found in <a href="https://raw.githubusercontent.com/mock-server/mockserver/master/mockserver.example.properties">github</a>, as follows:</p>
<pre class="prettyprint code"><code class="code">###############################
# MockServer & Proxy Settings #
###############################

# Socket & Port Settings

# socket timeout in milliseconds (default 120000)
mockserver.maxSocketTimeout=120000

# Certificate Generation

# dynamically generated CA key pair (if they don't already exist in specified directory)
mockserver.dynamicallyCreateCertificateAuthorityCertificate=true
# save dynamically generated CA key pair in working directory
mockserver.directoryToSaveDynamicSSLCertificate=.
# certificate domain name (default "localhost")
mockserver.sslCertificateDomainName=localhost
# comma separated list of ip addresses for Subject Alternative Name domain names (default empty list)
mockserver.sslSubjectAlternativeNameDomains=www.example.com,www.another.com
# comma separated list of ip addresses for Subject Alternative Name ips (default empty list)
mockserver.sslSubjectAlternativeNameIps=127.0.0.1

# CORS

# enable CORS for MockServer REST API
mockserver.enableCORSForAPI=true
# enable CORS for all responses
mockserver.enableCORSForAllResponses=true</code></pre>


<a id="configuration_properties" class="anchor" href="#configuration_properties">&nbsp;</a>

<h2>Configuration Properties</h2>

<a id="liveness_configuration" class="anchor" href="#liveness_configuration">&nbsp;</a>

<h2>Liveness Configuration:</h2>

<button id="button_configuration_liveness_get_path" class="accordion title"><strong>Path for HTTP GET liveness / healthcheck probes</strong></button>
<div class="panel title">
    <p>Path to support HTTP GET requests for status response (also available on PUT /mockserver/status).</p>
    <p>If this value is not modified then only PUT /mockserver/status but is a none blank value is provided for this value then GET requests to this path will return the 200 Ok status response showing the MockServer version and bound ports.</p>
    <p>A GET request to this path will be matched before any expectation matching or proxying of requests.</p>
    <p>Type: <span class="keyword">string</span> Default: <span class="this_value">null</span></p>
    <p>Java Code:</p>
    <pre class="prettyprint lang-java code"><code class="code">ConfigurationProperties.livenessHttpGetPath(String livenessPath)</code></pre>
    <p>System Property:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.livenessHttpGetPath=...</code></pre>
    <p>Environment Variable:</p>
    <pre class="code" style="padding: 2px;"><code class="code">MOCKSERVER_LIVENESS_HTTP_GET_PATH=...</code></pre>
    <p>Property File:</p>
    <pre class="code" style="padding: 2px;"><code class="code">mockserver.livenessHttpGetPath=...</code></pre>
    <p>Example:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.livenessHttpGetPath="/liveness/probe"</code></pre>
</div>

<a id="memory_configuration" class="anchor" href="#memory_configuration">&nbsp;</a>

<h2>Memory Usage Configuration:</h2>

<button id="button_configuration_max_expectations" class="accordion title"><strong>Maximum Expectations To Hold In Memory</strong></button>
<div class="panel title">
    <p>Maximum number of expectations held in the in-memory ring buffer</p>
    <p>Type: <span class="keyword">int</span> Default: <span class="this_value">free heap space in KB / 400</span></p>
    <p>Java Code:</p>
    <pre class="prettyprint lang-java code"><code class="code">ConfigurationProperties.maxExpectations(int count)</code></pre>
    <p>System Property:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.maxExpectations=...</code></pre>
    <p>Environment Variable:</p>
    <pre class="code" style="padding: 2px;"><code class="code">MOCKSERVER_MAX_EXPECTATIONS=...</code></pre>
    <p>Property File:</p>
    <pre class="code" style="padding: 2px;"><code class="code">mockserver.maxExpectations=...</code></pre>
    <p>Example:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.maxExpectations="2000"</code></pre>
</div>

<button id="button_configuration_request_log_size" class="accordion title"><strong>Maximum Log Entries To Hold In Memory</strong></button>
<div class="panel title">
    <p>Maximum number of log entries to hold in memory, this include recorded requests, expectation match failures and other log entries.  The lower the <a href="#button_configuration_log_level">log level</a> the more log entries will be captured, particularly at TRACE level logging.</p>
    <p>Type: <span class="keyword">int</span> Default: <span class="this_value">free heap space in KB / 30</span></p>
    <p>Java Code:</p>
    <pre class="prettyprint lang-java code"><code class="code">ConfigurationProperties.maxLogEntries(int count)</code></pre>
    <p>System Property:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.maxLogEntries=...</code></pre>
    <p>Environment Variable:</p>
    <pre class="code" style="padding: 2px;"><code class="code">MOCKSERVER_MAX_LOG_ENTRIES=...</code></pre>
    <p>Property File:</p>
    <pre class="code" style="padding: 2px;"><code class="code">mockserver.maxLogEntries=...</code></pre>
    <p>Example:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.maxLogEntries="2000"</code></pre>
</div>

<button id="button_configuration_max_web_socket_expectations" class="accordion title"><strong>Maximum WebSockets For Object Callback Expectations</strong></button>
<div class="panel title">
    <p>Maximum number of WebSockets held in the in-memory ring buffer</p>
    <p>Type: <span class="keyword">int</span> Default: <span class="this_value">1500</span></p>
    <p>Java Code:</p>
    <pre class="prettyprint lang-java code"><code class="code">ConfigurationProperties.maxWebSocketExpectations(int count)</code></pre>
    <p>System Property:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.maxWebSocketExpectations=...</code></pre>
    <p>Environment Variable:</p>
    <pre class="code" style="padding: 2px;"><code class="code">MOCKSERVER_MAX_WEB_SOCKET_EXPECTATIONS=...</code></pre>
    <p>Property File:</p>
    <pre class="code" style="padding: 2px;"><code class="code">mockserver.maxWebSocketExpectations=...</code></pre>
    <p>Example:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.maxWebSocketExpectations="2000"</code></pre>
</div>

<button id="button_configuration_log_memory_statistics" class="accordion title"><strong>Output JVM Memory Usage</strong></button>
<div class="panel title">
    <p>Output JVM memory usage metrics to CSV file periodically called <strong>memoryUsage_&lt;yyyy-MM-dd&gt;.csv</strong></p>
    <p>Type: <span class="keyword">boolean</span> Default: <span class="this_value">false</span></p>
    <p>Java Code:</p>
    <pre class="prettyprint lang-java code"><code class="code">ConfigurationProperties.outputMemoryUsageCsv(boolean enable)</code></pre>
    <p>System Property:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.outputMemoryUsageCsv=...</code></pre>
    <p>Environment Variable:</p>
    <pre class="code" style="padding: 2px;"><code class="code">MOCKSERVER_OUTPUT_MEMORY_USAGE_CSV=...</code></pre>
    <p>Property File:</p>
    <pre class="code" style="padding: 2px;"><code class="code">mockserver.outputMemoryUsageCsv=...</code></pre>
    <p>Example:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.outputMemoryUsageCsv="true"</code></pre>
</div>

<a id="http_request_size_configuration" class="anchor" href="#http_request_size_configuration">&nbsp;</a>

<h2>Http Request Size Configuration:</h2>

<button id="button_configuration_max_initial_line_length" class="accordion title"><strong>Maximum HTTP Request Initial Line Length</strong></button>
<div class="panel title">
    <p>Maximum size the first line of an HTTP request</p>
    <p>Type: <span class="keyword">int</span> Default: <span class="this_value">4096</span></p>
    <p>Java Code:</p>
    <pre class="prettyprint lang-java code"><code class="code">ConfigurationProperties.maxInitialLineLength(int length)</code></pre>
    <p>System Property:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.maxInitialLineLength=...</code></pre>
    <p>Environment Variable:</p>
    <pre class="code" style="padding: 2px;"><code class="code">MOCKSERVER_MAX_INITIAL_LINE_LENGTH=...</code></pre>
    <p>Property File:</p>
    <pre class="code" style="padding: 2px;"><code class="code">mockserver.maxInitialLineLength=...</code></pre>
    <p>Example:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.maxInitialLineLength="8192"</code></pre>
</div>

<button id="button_configuration_max_header_size" class="accordion title"><strong>Maximum HTTP Request Header Size</strong></button>
<div class="panel title">
    <p>Maximum size HTTP request headers</p>
    <p>Type: <span class="keyword">int</span> Default: <span class="this_value">8192</span></p>
    <p>Java Code:</p>
    <pre class="prettyprint lang-java code"><code class="code">ConfigurationProperties.maxHeaderSize(int size)</code></pre>
    <p>System Property:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.maxHeaderSize=...</code></pre>
    <p>Environment Variable:</p>
    <pre class="code" style="padding: 2px;"><code class="code">MOCKSERVER_MAX_HEADER_SIZE=...</code></pre>
    <p>Property File:</p>
    <pre class="code" style="padding: 2px;"><code class="code">mockserver.maxHeaderSize=...</code></pre>
    <p>Example:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.maxHeaderSize="16384"</code></pre>
</div>

<button id="button_configuration_max_chunk_size" class="accordion title"><strong>Maximum HTTP Request Chunk Size</strong></button>
<div class="panel title">
    <p>Maximum size of HTTP chunks in request or responses</p>
    <p>Type: <span class="keyword">int</span> Default: <span class="this_value">8192</span></p>
    <p>Java Code:</p>
    <pre class="prettyprint lang-java code"><code class="code">ConfigurationProperties.maxChunkSize(int size)</code></pre>
    <p>System Property:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.maxChunkSize=...</code></pre>
    <p>Environment Variable:</p>
    <pre class="code" style="padding: 2px;"><code class="code">MOCKSERVER_MAX_CHUNK_SIZE=...</code></pre>
    <p>Property File:</p>
    <pre class="code" style="padding: 2px;"><code class="code">mockserver.maxChunkSize=...</code></pre>
    <p>Example:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.maxChunkSize="16384"</code></pre>
</div>

{% include_subpage _includes/performance_configuration.html %}

<a id="socket_configuration" class="anchor" href="#socket_configuration">&nbsp;</a>

<h2>Socket Configuration:</h2>

<button id="button_configuration_max_socket_timeout" class="accordion title"><strong>Maximum Socket Timeout</strong></button>
<div class="panel title">
    <p>Maximum time allowed for a response from a socket</p>
    <p>Type: <span class="keyword">long</span> Default: <span class="this_value">20000</span></p>
    <p>Java Code:</p>
    <pre class="prettyprint lang-java code"><code class="code">ConfigurationProperties.maxSocketTimeout(long milliseconds)</code></pre>
    <p>System Property:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.maxSocketTimeout=...</code></pre>
    <p>Environment Variable:</p>
    <pre class="code" style="padding: 2px;"><code class="code">MOCKSERVER_MAX_SOCKET_TIMEOUT=...</code></pre>
    <p>Property File:</p>
    <pre class="code" style="padding: 2px;"><code class="code">mockserver.maxSocketTimeout=...</code></pre>
    <p>Example:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.maxSocketTimeout="10000"</code></pre>
</div>

<button id="button_configuration_socket_connection_timeout" class="accordion title"><strong>Maximum Socket Connection Timeout</strong></button>
<div class="panel title">
    <p>Maximum time allowed to connect to a socket</p>
    <p>Type: <span class="keyword">int</span> Default: <span class="this_value">20000</span></p>
    <p>Java Code:</p>
    <pre class="prettyprint lang-java code"><code class="code">ConfigurationProperties.socketConnectionTimeout(int milliseconds)</code></pre>
    <p>System Property:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.socketConnectionTimeout=...</code></pre>
    <p>Environment Variable:</p>
    <pre class="code" style="padding: 2px;"><code class="code">MOCKSERVER_SOCKET_CONNECTION_TIMEOUT=...</code></pre>
    <p>Property File:</p>
    <pre class="code" style="padding: 2px;"><code class="code">mockserver.socketConnectionTimeout=...</code></pre>
    <p>Example:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.socketConnectionTimeout="10000"</code></pre>
</div>

<button id="button_configuration_matchers_fail_fast" class="accordion title"><strong>Request Matchers Fail Fast</strong></button>
<div class="panel title">
    <p>If true (the default) request matchers will fail on the first non-matching field, if false request matchers will compare all fields.</p>
    <p>This is useful to see all mismatching fields in the log event recording that a request matcher did not match.</p>
    <p>Type: <span class="keyword">string</span> Default: <span class="this_value">true</span></p>
    <p>Java Code:</p>
    <pre class="prettyprint lang-java code"><code class="code">ConfigurationProperties.matchersFailFast(boolean enable)</code></pre>
    <p>System Property:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.matchersFailFast=...</code></pre>
    <p>Environment Variable:</p>
    <pre class="code" style="padding: 2px;"><code class="code">MOCKSERVER_MATCHERS_FAIL_FAST=...</code></pre>
    <p>Property File:</p>
    <pre class="code" style="padding: 2px;"><code class="code">mockserver.matchersFailFast=...</code></pre>
    <p>Example:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.matchersFailFast="false"</code></pre>
</div>

<button id="button_configuration_detailed_match_failures" class="accordion title"><strong>Detailed Match Failures</strong></button>
<div class="panel title">
    <p>If true (the default) the log event recording that a request matcher did not match will include a detailed reason why each non matching field did not match.</p>
    <p>Type: <span class="keyword">string</span> Default: <span class="this_value">true</span></p>
    <p>Java Code:</p>
    <pre class="prettyprint lang-java code"><code class="code">ConfigurationProperties.detailedMatchFailures(boolean enable)</code></pre>
    <p>System Property:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.detailedMatchFailures=...</code></pre>
    <p>Environment Variable:</p>
    <pre class="code" style="padding: 2px;"><code class="code">MOCKSERVER_DETAILED_MATCH_FAILURES=...</code></pre>
    <p>Property File:</p>
    <pre class="code" style="padding: 2px;"><code class="code">mockserver.detailedMatchFailures=...</code></pre>
    <p>Example:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.detailedMatchFailures="false"</code></pre>
</div>

<button id="button_configuration_launch_ui__debug" class="accordion title"><strong>ClientAndServer launches UI for DEBUG logLevel</strong></button>
<div class="panel title">
    <p>If true (the default) the ClientAndServer constructor or static factor methods will open the UI in the default browser when the log level is set to DEBUG.</p>
    <p>Type: <span class="keyword">string</span> Default: <span class="this_value">false</span></p>
    <p>Java Code:</p>
    <pre class="prettyprint lang-java code"><code class="code">ConfigurationProperties.launchUIForLogLevelDebug(boolean enable)</code></pre>
    <p>System Property:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.launchUIForLogLevelDebug=...</code></pre>
    <p>Environment Variable:</p>
    <pre class="code" style="padding: 2px;"><code class="code">MOCKSERVER_LAUNCH_UI_FOR_LOG_LEVEL_DEBUG=...</code></pre>
    <p>Property File:</p>
    <pre class="code" style="padding: 2px;"><code class="code">mockserver.launchUIForLogLevelDebug=...</code></pre>
    <p>Example:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.launchUIForLogLevelDebug="false"</code></pre>
</div>

<button id="button_configuration_local_bound_ip" class="accordion title"><strong>Local Bound IP For Accepting Socket Connection</strong></button>
<div class="panel title">
    <p>The local IP address to bind to for accepting new socket connections</p>
    <p>Type: <span class="keyword">string</span> Default: <span class="this_value">0.0.0.0</span></p>
    <p>Java Code:</p>
    <pre class="prettyprint lang-java code"><code class="code">ConfigurationProperties.localBoundIP(String localBoundIP)</code></pre>
    <p>System Property:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.localBoundIP=...</code></pre>
    <p>Environment Variable:</p>
    <pre class="code" style="padding: 2px;"><code class="code">MOCKSERVER_LOCAL_BOUND_IP=...</code></pre>
    <p>Property File:</p>
    <pre class="code" style="padding: 2px;"><code class="code">mockserver.localBoundIP=...</code></pre>
    <p>Example:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.localBoundIP="0.0.0.0"</code></pre>
</div>

{% include_subpage _includes/tls_configuration.html %}

{% include_subpage _includes/logging_configuration.html %}

<a id="proxy_configuration" class="anchor" href="#proxy_configuration">&nbsp;</a>

<h2>Proxying Configuration:</h2>

<button id="button_configuration_attempt_to_proxy_if_no_matching_expectation" class="accordion title"><strong>Attempt To Proxy Request If No Matching Expectation</strong></button>
<div class="panel title">
    <p>If true (the default) when no matching expectation is found, and the host header of the request does not match MockServer's host, then MockServer attempts to proxy the request if that fails then a 404 is returned.</p>
    <p>If false when no matching expectation is found, and MockServer is not being used as a proxy, then MockServer always returns a 404 immediately.</p>
    <p>Type: <span class="keyword">string</span> Default: <span class="this_value">true</span></p>
    <p>Java Code:</p>
    <pre class="prettyprint lang-java code"><code class="code">ConfigurationProperties.attemptToProxyIfNoMatchingExpectation(boolean enable)</code></pre>
    <p>System Property:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.attemptToProxyIfNoMatchingExpectation=...</code></pre>
    <p>Environment Variable:</p>
    <pre class="code" style="padding: 2px;"><code class="code">MOCKSERVER_ATTEMPT_TO_PROXY_IF_NO_MATCHING_EXPECTATION=...</code></pre>
    <p>Property File:</p>
    <pre class="code" style="padding: 2px;"><code class="code">mockserver.attemptToProxyIfNoMatchingExpectation=...</code></pre>
    <p>Example:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.attemptToProxyIfNoMatchingExpectation="false"</code></pre>
</div>

<button id="button_configuration_http_proxy" class="accordion title"><strong>HTTP Proxy For Forwarded Requests</strong></button>
<div class="panel title">
    <p>Use HTTP proxy (i.e. via Host header) for all outbound / forwarded requests</p>
    <p>Type: <span class="keyword">string</span> Default: <span class="this_value">null</span></p>
    <p>Java Code:</p>
    <pre class="prettyprint lang-java code"><code class="code">ConfigurationProperties.forwardHttpProxy(String hostAndPort)</code></pre>
    <p>System Property:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.forwardHttpProxy=...</code></pre>
    <p>Environment Variable:</p>
    <pre class="code" style="padding: 2px;"><code class="code">MOCKSERVER_FORWARD_HTTP_PROXY=...</code></pre>
    <p>Property File:</p>
    <pre class="code" style="padding: 2px;"><code class="code">mockserver.forwardHttpProxy=...</code></pre>
    <p>Example:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.forwardHttpProxy="127.0.0.1:1090"</code></pre>
</div>

<button id="button_configuration_https_proxy" class="accordion title"><strong>HTTPS Proxy For Forwarded Requests</strong></button>
<div class="panel title">
    <p>Use HTTPS proxy (i.e. HTTP CONNECT) for all outbound / forwarded requests, supports TLS tunnelling of HTTPS requests</p>
    <p>Type: <span class="keyword">string</span> Default: <span class="this_value">null</span></p>
    <p>Java Code:</p>
    <pre class="prettyprint lang-java code"><code class="code">ConfigurationProperties.forwardHttpsProxy(String hostAndPort)</code></pre>
    <p>System Property:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.forwardHttpsProxy=...</code></pre>
    <p>Environment Variable:</p>
    <pre class="code" style="padding: 2px;"><code class="code">MOCKSERVER_FORWARD_HTTPS_PROXY=...</code></pre>
    <p>Property File:</p>
    <pre class="code" style="padding: 2px;"><code class="code">mockserver.forwardHttpsProxy=...</code></pre>
    <p>Example:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.forwardHttpsProxy="127.0.0.1:1090"</code></pre>
</div>

<button id="button_configuration_socks_proxy" class="accordion title"><strong>SOCKS Proxy For Forwarded Requests</strong></button>
<div class="panel title">
    <p>Use SOCKS proxy for all outbound / forwarded requests, support TLS tunnelling of TCP connections</p>
    <p>Type: <span class="keyword">string</span> Default: <span class="this_value">null</span></p>
    <p>Java Code:</p>
    <pre class="prettyprint lang-java code"><code class="code">ConfigurationProperties.forwardSocksProxy(String hostAndPort)</code></pre>
    <p>System Property:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.forwardSocksProxy=...</code></pre>
    <p>Environment Variable:</p>
    <pre class="code" style="padding: 2px;"><code class="code">MOCKSERVER_FORWARD_SOCKS_PROXY=...</code></pre>
    <p>Property File:</p>
    <pre class="code" style="padding: 2px;"><code class="code">mockserver.forwardSocksProxy=...</code></pre>
    <p>Example:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.forwardSocksProxy="127.0.0.1:1090"</code></pre>
</div>

<button id="button_configuration_forward_proxy_authentication_username" class="accordion title"><strong>Proxy Authentication Username For Forwarded Requests</strong></button>
<div class="panel title">
    <p>Username for proxy authentication when using HTTPS proxy (i.e. HTTP CONNECT) for all outbound / forwarded requests</p>
    <p>Type: <span class="keyword">string</span> Default: <span class="this_value">null</span></p>
    <p>Java Code:</p>
    <pre class="prettyprint lang-java code"><code class="code">ConfigurationProperties.forwardProxyAuthenticationUsername(String forwardProxyAuthenticationUsername)</code></pre>
    <p>System Property:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.forwardProxyAuthenticationUsername=...</code></pre>
    <p>Environment Variable:</p>
    <pre class="code" style="padding: 2px;"><code class="code">MOCKSERVER_FORWARD_PROXY_AUTHENTICATION_USERNAME=...</code></pre>
    <p>Property File:</p>
    <pre class="code" style="padding: 2px;"><code class="code">mockserver.forwardProxyAuthenticationUsername=...</code></pre>
    <p>Example:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.forwardProxyAuthenticationUsername=john.doe</code></pre>
</div>

<button id="button_configuration_forward_proxy_authentication_password" class="accordion title"><strong>Proxy Authentication Password For Forwarded Requests</strong></button>
<div class="panel title">
    <p>Password for proxy authentication when using HTTPS proxy (i.e. HTTP CONNECT) for all outbound / forwarded requests</p>
    <p>Type: <span class="keyword">string</span> Default: <span class="this_value">null</span></p>
    <p>Java Code:</p>
    <pre class="prettyprint lang-java code"><code class="code">ConfigurationProperties.forwardProxyAuthenticationPassword(String forwardProxyAuthenticationPassword)</code></pre>
    <p>System Property:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.forwardProxyAuthenticationPassword=...</code></pre>
    <p>Environment Variable:</p>
    <pre class="code" style="padding: 2px;"><code class="code">MOCKSERVER_FORWARD_PROXY_AUTHENTICATION_PASSWORD=...</code></pre>
    <p>Property File:</p>
    <pre class="code" style="padding: 2px;"><code class="code">mockserver.forwardProxyAuthenticationPassword=...</code></pre>
    <p>Example:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.forwardProxyAuthenticationPassword="p@ssw0rd"</code></pre>
</div>

<button id="button_configuration_proxy_authentication_realm" class="accordion title"><strong>Realm For Proxy Authentication to MockServer</strong></button>
<div class="panel title">
    <p>The authentication realm for proxy authentication to MockServer</p>
    <p>Type: <span class="keyword">string</span> Default: <span class="this_value">MockServer HTTP Proxy</span></p>
    <p>Java Code:</p>
    <pre class="prettyprint lang-java code"><code class="code">ConfigurationProperties.proxyAuthenticationRealm(String proxyAuthenticationRealm)</code></pre>
    <p>System Property:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.proxyAuthenticationRealm=...</code></pre>
    <p>Environment Variable:</p>
    <pre class="code" style="padding: 2px;"><code class="code">MOCKSERVER_PROXY_SERVER_REALM=...</code></pre>
    <p>Property File:</p>
    <pre class="code" style="padding: 2px;"><code class="code">mockserver.proxyAuthenticationRealm=...</code></pre>
    <p>Example:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.proxyAuthenticationRealm="MockServer HTTP Proxy"</code></pre>
</div>

<button id="button_configuration_proxy_authentication_username" class="accordion title"><strong>Required Username For Proxy Authentication to MockServer</strong></button>
<div class="panel title">
    <p>The required username for proxy authentication to MockServer</p>
    <p>Type: <span class="keyword">string</span> Default: <span class="this_value">john.doe</span></p>
    <p>Java Code:</p>
    <pre class="prettyprint lang-java code"><code class="code">ConfigurationProperties.proxyAuthenticationUsername(String proxyAuthenticationUsername)</code></pre>
    <p>System Property:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.proxyAuthenticationUsername=...</code></pre>
    <p>Environment Variable:</p>
    <pre class="code" style="padding: 2px;"><code class="code">MOCKSERVER_PROXY_AUTHENTICATION_USERNAME=...</code></pre>
    <p>Property File:</p>
    <pre class="code" style="padding: 2px;"><code class="code">mockserver.proxyAuthenticationUsername=...</code></pre>
    <p>Example:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.proxyAuthenticationUsername=john.doe</code></pre>
</div>

<button id="button_configuration_proxy_authentication_password" class="accordion title"><strong>Required Password For Proxy Authentication to MockServer</strong></button>
<div class="panel title">
    <p>The required password for proxy authentication to MockServer</p>
    <p>Type: <span class="keyword">string</span> Default: <span class="this_value">p@ssw0rd</span></p>
    <p>Java Code:</p>
    <pre class="prettyprint lang-java code"><code class="code">ConfigurationProperties.proxyAuthenticationPassword(String proxyAuthenticationPassword)</code></pre>
    <p>System Property:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.proxyAuthenticationPassword=...</code></pre>
    <p>Environment Variable:</p>
    <pre class="code" style="padding: 2px;"><code class="code">MOCKSERVER_PROXY_AUTHENTICATION_PASSWORD=...</code></pre>
    <p>Property File:</p>
    <pre class="code" style="padding: 2px;"><code class="code">mockserver.proxyAuthenticationPassword=...</code></pre>
    <p>Example:</p>
    <pre class="code" style="padding: 2px;"><code class="code">-Dmockserver.proxyAuthenticationPassword="p@ssw0rd"</code></pre>
</div>

{% include_subpage _includes/initializer_persistence_configuration.html %}

{% include_subpage _includes/cors_configuration.html %}
